package com.crm.service.impl.csd.customerManager;

import com.crm.dao.mapper.customMapper.csd.ContractAndOrderMapper;
import com.crm.model.vo.csd.customerManager.ContractAndOrderVO;
import com.crm.model.vo.customerContractManager.CustomerContractVO;
import com.crm.service.csd.customerManager.ContractAndOrderDbService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author yincuimei
 * @Date 2021/8/26 16:19
 * (客服部)合同&订单
 */
@Service
public class ContractAndOrderDbServiceImpl implements ContractAndOrderDbService {
    @Autowired
    private ContractAndOrderMapper contractAndOrderMapper;

    /**
     * 合同列表(合同为主)
     * @param customerId  --客户ID
     * @param orderStr    --排序
     * @author yincuimei
     * @return
     */
    @Override
    public List<ContractAndOrderVO> selectContractVOList(String customerId,String orderStr){
        return contractAndOrderMapper.selectContractVOList(customerId,orderStr);
    }

    /**
     * 订单列表(订单为主)
     * @param customerId  --客户ID
     * @param orderStr    --排序
     * @author yincuimei
     * @return
     */
    @Override
    public List<ContractAndOrderVO> selectOrderVOList(String customerId, String orderStr) {
        return contractAndOrderMapper.selectOrderVOList(customerId,orderStr);
    }

    @Override
    public Boolean addCustomerContract(CustomerContractVO customerContractVO) {
        return contractAndOrderMapper.addCustomerContract(customerContractVO);
    }
}
